package cn.com.bluemoon.daps.sync.vo.dev2model;

import cn.com.bluemoon.daps.common.domain.UserPermissionApi;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.util.List;

/**
 * @author Jarod.Kong
 * @date 2021/6/16 21:52
 */
@ApiModel(description = "导入开发库表")
@Data
public class Sync2ModelVo implements UserPermissionApi<String> {
    @ApiModelProperty("模型id")
    @NotEmpty(message = "模型id入参必填")
    private String modelId;

    @ApiModelProperty("分组id")
    private String groupId;

    @ApiModelProperty("所选表名id")
    @NotEmpty(message = "表名不可为空")
    private List<String> tableNames;

    /**
     * @return 获取mvc传输中对应模型的id
     */
    @Override
    @ApiModelProperty(hidden = true)
    public String getUserPermissionKeyValue() {
        return getModelId();
    }
}
